package routers

import (
	"quickstart/controllers"

	"github.com/astaxie/beego"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	beego.Router("/login", &controllers.LoginControllers{})

	//会员模块
	beego.Router("/user_list", &controllers.UserControllers{})
	beego.Router("/user/byId", &controllers.UserControllers{}, "post:UserById")
	beego.Router("/user/list", &controllers.UserControllers{}, "post:UserList")
	beego.Router("/user/add", &controllers.UserControllers{}, "post:AddUser")
	beego.Router("/user/del", &controllers.UserControllers{}, "post:DelUser")
	beego.Router("/user/set", &controllers.UserControllers{}, "post:SetUser")
	beego.Router("/user/uploads", &controllers.UserControllers{}, "post:UploadFiles")

	//文章模块
	beego.Router("/article_list", &controllers.ArticleControllers{})
	beego.Router("/article/byId", &controllers.ArticleControllers{}, "post:ArticleById")
	beego.Router("/article/add", &controllers.ArticleControllers{}, "post:AddArticle")
	beego.Router("/article/set", &controllers.ArticleControllers{}, "post:SetArticle")
	beego.Router("/article/del", &controllers.ArticleControllers{}, "post:DelArticle")
}
